<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta name="language" content="en" />

        <?php {
            $baseUrl = Yii::app()->request->baseUrl ?>
            <!-- blueprint CSS framework -->
            <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl ?>/css/blueprint/screen.css" media="screen, projection" />
            <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl ?>/css/blueprint/print.css" media="print" />
            <!--[if lt IE 8]>
            <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl ?>/css/blueprint/ie.css" media="screen, projection" />
            <![endif]-->

            <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl ?>/css/admin/main.css" />
            <link rel="stylesheet" type="text/css" href="<?php echo $baseUrl ?>/css/admin/form.css" />
            <script type="text/javascript" src="<?php echo $baseUrl ?>/js/jquery/jquery.min.js"></script>
        <?php } ?>

        <title><?php echo CHtml::encode($this->pageTitle); ?></title>
    </head>
    <body>
        <div class="container" id="page">

            <div id="header">
                <div id="logo">Administration</div>
            </div><!-- header -->

            <div id="mainmenu">
                <?php
                $this->widget('zii.widgets.CMenu', array(
                    'items' => array(
                        //  array('label' => mb_strtoupper(Yii::t('default', 'AdminHome'), 'utf-8'), 'url' => array('/admin/default'), 'visible' => !Yii::app()->user->isGuest),
                        array('label' => mb_strtoupper(Yii::t('default', 'Category'), 'utf-8'), 'url' => array('/admin/category'), 'visible' => !Yii::app()->user->isGuest),
                        array('label' => mb_strtoupper(Yii::t('default', 'Product'), 'utf-8'), 'url' => array('/admin/product'), 'visible' => !Yii::app()->user->isGuest),
                        array('label' => mb_strtoupper(Yii::t('default', 'Post'), 'utf-8'), 'url' => array('/admin/post'), 'visible' => !Yii::app()->user->isGuest),
                        //array('label' => mb_strtoupper(Yii::t('default', 'Cart'), 'utf-8'), 'url' => array('/admin/cart'), 'visible' => !Yii::app()->user->isGuest),
                        array('label' => mb_strtoupper(Yii::t('default', 'Logout'), 'utf-8') . '(' . Yii::app()->user->name . ')', 'url' => array('/admin/default/logout'), 'visible' => !Yii::app()->user->isGuest)
                    )
                ));
                ?>
            </div><!-- mainmenu -->
            <?php
            /* $this->breadcrumbs = array(
              $this->module->id,
              $this->id,
              $this->action->id
              ); */
            ?>
            <?php if (isset($this->breadcrumbs)): ?>
                <?php
                $this->widget('zii.widgets.CBreadcrumbs', array(
                    'links' => $this->breadcrumbs,
                ));
                ?><!-- breadcrumbs -->
            <?php endif ?>

            <?php echo $content; ?>
            <script type="text/javascript">
                jQuery(function() {
                    jQuery('#content').css('min-height', 
                    jQuery(window).height() - 
                        jQuery('#header').height() - 
                        jQuery('#footer').height() - 
                        jQuery('#mainmenu').height() -
                        jQuery('.breadcrumbs').height() - 106                    
                );
                    //jQuery('#content').css('width','1000px');
                    // jQuery('#content').css('min-width','1000px');
                    // jQuery('#content').css('max-width','1000px');
                });
            </script>

            <div class="clear"></div>

            <div id="footer">
                <?php echo Yii::t('default', 'Copyright © {year} by ', array('{year}' => date('Y'))) ?><br/>
                <?php echo Yii::t('default', 'All Rights Reserved.') ?><br/>
                <?php echo Yii::t('default', 'Developed by ') ?><a href="http://www.tiachopphuongdong.com">Tia Chop Phuong Dong</a>.
            </div><!-- footer -->
        </div><!-- page -->
    </body>
</html>
